<%@page import="java.sql.*"%>
<%@page import="com.mysql.*"%>

<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>  
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<link rel="stylesheet" href="resources/mytheme/css/style.css">
<title>My Account</title>
</head>
<body>
<%
    try{
int u = (Integer)request.getSession().getAttribute("uName");
String sqlQuery = "select accesslevel from users where _z4 = " + u;

Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/moviedatabase","dbuser","dbpassword");
       Statement statement = connection.createStatement();
       ResultSet rs = statement.executeQuery(sqlQuery);
     
       String s = "";
		if(rs.next())
		{
			s = rs.getString(1);
		}
%>


<div id=header2>

	<div id="logo">
		<img src="resources/mytheme/Logo.png" alt="RentFlix">
	</div>
	
	<div id="searchNav">
		<form name="inputForm" method="get">
			<input class="searchBox" type="text" name="searchBox" placeholder="Search for Movies..." onkeyup="fastSearch()">
			<input class="searchButton" type="submit" value="Search">
			<br>
			<!-- <input class="checkbox" type="checkbox" name="desc" value="show">Show Description -->
		</form>
	</div>
	
	<div id="navBar">
		<ul>
		    <li><a href="/MovieProject/browse">Movies</a></li>
		    <li><a href="/MovieProject/browse?genre=Family&rating=&decade=">Kids</a></li>
		    <li><a href="/MovieProject/viewqueue">Queue</a></li>
		</ul>
	</div>
	
	<div id="loginBar">
		<ul>
			<li><div id="signoutform"><form action="signout" method="post" name="loutform"><input class="lastlink" type="submit" value="Sign Out" style="text-transform:capitalize;"></form></div></li>
			
			<li><a class="firstlink" href="/MovieProject/browse">Home</a> </li>
<%-- 			<li><%=request.getAttribute("message")%></li> --%>
				<% if(s.equals("0"))
				{ %>
				<li><a href="/MovieProject/reports">Admin: In-Stock</a> </li>
				<li><a href="/MovieProject/userQueues">Admin: Queues</a> </li>
				<li><a href="/MovieProject/popularMovieReport">Admin: Popular Movies</a> </li>
				<li><a href="/MovieProject/newMovie">Admin: Add Movie</a> </li>
				<li><a href="/MovieProject/CheckInRentals">Admin: Check-In</a> </li>
				<% } %>
			
		</ul>
	</div>
	
</div>
<div id="body">

<br><br><br><br>

	<h1>My Account Information</h1>
	<p style="text: bold">My Account
	<div>
		<ul>
			<li><a href="/MovieProject/EditAccount">View or change my
					account information</a></li>
			<li><a href="/MovieProject/EditPassword">Change my account
					password.</a>
			<li><a href="/MovieProject/viewqueue">View My Queue</a>

		</ul>

		
	</div>
</div>


<div id="footer">
	<div id="foota">
		<p>Get Help</p>
		<ul>
		  <li><a href="#">FAQ</a></li>
		  <li><a href="#">Help Center</a></li>
		  <li><a href="#">Account</a></li>
		  <li><a href="#">Questions</a></li>
		</ul>
	</div>

	<div id="footb"><p>Our Company</p>
	
		<ul>
		  <li><a href="#">About us </a></li>
		  <li><a href="#">Reviews  </a></li>
		  <li><a href="#">Jobs  </a></li>
		  <li><a href="#">Terms of Use</a></li>
		</ul>
	</div>
	
	<div id="footc"><p>Getting Started</p>
		<ul>
		  <li><a href="#">Free Trail Offer Details  </a></li>
		  <li><a href="#"> Redeem Your Gift</a></li>
		</ul>
	</div>
</div>
<%
        }
        catch(Exception e)
        {
             out.println("wrong entry"+e);
        }
%>

</body>
</html>